<template>
  <view class="pay-success">
    <view class="wrapper">
      <div class="content"><icon type="success" size="35" /></div>
      <div class="content">支付成功</div>
      <div class="content btn">
        <button @click="myOrderTo" size="mini" type="primary">
          查看我的订单
        </button>
      </div>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      openid: "",
      name: "",
      phone: "",
    };
  },
  onShow() {
    let that = this;
    uni.getStorage({
      key: "openid",
      success: function (res) {
        // console.log(res);
        that.openid = res.data;
        that
          .$MyRequest({
            url: "/get_all_people",
            method: "POST",
            data: {
              openid: that.openid,
            },
          })
          .then((res) => {
            that.name = res.data.data[0].name;
            that.phone = res.data.data[0].phone;
          });
      },
    });
  },
  methods: {
    myOrderTo() {
      uni.redirectTo({ url: "/pages/home/service/GroupBuying/MyOrder" });
    },
  },
};
</script>

<style lang="scss">
@import "@/static/styles/mixin.scss";
.pay-success {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  .wrapper {
    padding-top: 200rpx;
  }
  .content {
    @include center;
  }
  .btn {
    padding-top: 20rpx;
    button {
      // height: 70rpx;
    }
  }
}
</style>
